<!doctype html>
<!--
// Copyright 2012 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-->
<html>
<head>
  <meta charset="utf-8">
  <title>Moog JS Demo</title>
</head>
<body>

<h1>Moog Doodle Demo Page</h1>
To get this running:
<ul>
  <li>Download
      <a href="http://code.google.com/p/closure-library/source/browse/#svn%2Ftrunk%2Fclosure%2Fgoog">Closure
    Library</a> to a folder named 'closure' in this directory.</li>
  <li>Make sure volume is unmuted, speakers are on, etc.</li>
  <li>Open this file in a Web Audio enabled browser like Chrome.</li>
</ul>

<script src="closure/base.js"></script>
<script src="closure/deps.js"></script>
<script src="deps.js"></script>
<script>
goog.require('doodle.moog.Moog');

window.onload = function() {
  var moog = new doodle.moog.Moog();
  moog.turnOnAudio();

  // Play a note for 5 seconds.
  moog.synthesizers_[0].setKeyDown(4);
  setTimeout(function() {
    moog.synthesizers_[0].setKeyUp();
  }, 5000);
};
</script>

</body>
</html>
